﻿#ifndef FILENAMEDIALOG_H
#define FILENAMEDIALOG_H

#include <QtWidgets/QDialog>
#include <QtCore/QSettings>
#include <QtWidgets/QAction>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QTableWidget>
#include <QtWidgets/QVBoxLayout>

class FileNameDialog : public QDialog
{
    Q_OBJECT

public:
    explicit FileNameDialog(QWidget *parent = 0);
    QString getFileName(int row, int col) const;
    QString getDir() const;
    ~FileNameDialog();

public slots:
    void loadSettings(QSettings &settings);
    void writeSettings(QSettings &settings);

private slots:
    void setDir(void);
    void applyToAll(void);
    void applyToRow(void);
    void applyToCol(void);
private:
    void initContent();
    void initConnection();
private:
    QString m_dir;
    int m_colCount;
    int m_rowCount;

    QVBoxLayout *verticalLayout;
    QHBoxLayout *horizontalLayout;
    QHBoxLayout *horizontalLayout_2;

    QAction *actionApplyToAll;
    QAction *actionApplyToCurrentRow;
    QAction *actionApplyToCurrentCol;

    QTableWidget *tableWidget;
    QPushButton *pushButtonDir;
    QPushButton *pushButtonOK;
    QLineEdit *lineEditDir;

    QLabel *label;
};

#endif // FILENAMEDIALOG_H
